#include <iostream>
#include <string>
#include "assert.h"
#include "split_string.h"
#include "split_string_test.h"
using std::string;
using std::cout;
using std::endl;

void SplitStringTest::testSplitNormal()
{
	string testWord="Hello,this,is,a,test!";
	string oriSplitWord[]={"Hello","this","is","a","test!"};
	vector<string> ve=split(testWord,',');
	for(int i=0;i<ve.size();i++)
	{
		assertEqual(ve[i], oriSplitWord[i]);
	}
	cout << "testSplitNormal() OK!" << endl;
}

void SplitStringTest::testSplitBlank()
{
	string testWord="";
	vector<string> oriSplitWord;
	vector<string> ve=split(testWord,',');
	assertEqual(ve, oriSplitWord);
	cout << "testSplitBlank() OK!" << endl;
}
